{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "be2e0bd4",
   "metadata": {},
   "outputs": [],
   "source": [
    "list = ['python', 'java', 'c', 'c++', 'lisp']\n",
    "print(list[::2])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4b836d1e",
   "metadata": {},
   "source": [
    "1-07  \n",
    "创建元组(3，4，8，5)及(4,)，将两个元组合并为(3,4,8,5,4)，输出元组中的元素8及部分(4，8)，将元组反向输出，获取元组的长度、最大值和最小值。(5.0分)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eb37563f",
   "metadata": {},
   "outputs": [],
   "source": [
    "tuple1 = (3, 4, 8, 5)\n",
    "tuple2 = (4,)\n",
    "tuple3 = tuple1 + tuple2\n",
    "\n",
    "print(f'tuple3: {tuple3}')\n",
    "\n",
    "print(f'elm 8: {tuple3[2]}')\n",
    "print(f'(4, 8): {tuple3[1:3]}')\n",
    "\n",
    "print(f'reversed tuple3: {tuple3[::-1]}')\n",
    "\n",
    "print(f'length of tuple3: {len(tuple3)}')\n",
    "print(f'max of tuple3: {max(tuple3)}')\n",
    "print(f'min of tuple3: {min(tuple3)}')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
